<?php
//模拟登陆用户和密码
$name="admin";
$password= 123456;

//判断登陆
if($_GET['login']=="in"){
	if($_POST['username'] == $name && $_POST['password'] == $password){
	    $username = $_POST['username'];
		echo "登陆成功！"; 
	}else{
		echo '用户名或密码不正确！';
	}
	}else{
		echo '非法提交';
	}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<?php
   if(!isset($username)){
	}else{
		echo "你好，欢迎你". $username;
	}
?>
</body>
</html>